From: Marco Trevisan (TreviƱo) Date: Mon, 16 Feb 2026 20:58:25 +0000 (+0100) Subject: search: Do not use Cancellable.reset() X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~26^2~1^2~52 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=cead829503083658e736af5964d1d8eb3c92a6bb;p=gnome-shell.git search: Do not use Cancellable.reset() Cancellable reset API is deprecated for long time and it's quite broken. In fact if a search provider receives a cancelled event may end up checking if the cancellable has been cancelled, but this may not be true anymore after a reset. Use instead new cancellable instances so that once one is used we can consider the previous one completed and we can forget about it. Part-of: --- diff --git a/js/ui/search.js b/js/ui/search.js index 99b8725da..7f72a87d2 100644 --- a/js/ui/search.js +++ b/js/ui/search.js @@ -226,7 +226,7 @@ const SearchResultsBase = GObject.registerClass({ return; this._cancellable.cancel(); - this._cancellable.reset(); + this._cancellable = new Gio.Cancellable(); const metas = await this.provider.getResultMetas(metasNeeded, this._cancellable); @@ -742,7 +742,7 @@ export const SearchResultsView = GObject.registerClass({ this._startingSearch = true; this._cancellable.cancel(); - this._cancellable.reset(); + this._cancellable = new Gio.Cancellable(); if (terms.length === 0) { this._reset();